package mp3model;

import java.io.IOException;

import org.jaudiotagger.audio.exceptions.InvalidAudioFrameException;
import org.jaudiotagger.audio.exceptions.ReadOnlyFileException;
import org.jaudiotagger.audio.mp3.MP3File;
import org.jaudiotagger.tag.FieldKey;
import org.jaudiotagger.tag.TagException;
import org.jaudiotagger.tag.id3.AbstractID3v2Tag;
import org.jaudiotagger.tag.id3.ID3v1Tag;

public class Main {

	public static void main(String[] args) throws IOException, TagException, ReadOnlyFileException, InvalidAudioFrameException {
		MP3File mp3 = new MP3File("C:/users/gboe/Desktop/3dd/3 Doors Down - Loser.mp3");
		ID3v1Tag tag = mp3.hasID3v1Tag() ? mp3.getID3v1Tag() : new ID3v1Tag();
		AbstractID3v2Tag v23Tag = mp3.getID3v2Tag();
		for (FieldKey key : FieldKey.values()) {
			System.out.println(key+": " + v23Tag.getFirst(key));
		}
		
	}
	
}
